<template>
  <view class="my">
    <view class="head" :style="{ paddingTop: menuButtonHeight + 'px' }">
			<view class="" style="margin-right: 20rpx;">
				<u-avatar size="60" src="https://cdn.uviewui.com/uview/album/2.jpg" />
			</view>
      <view class="ml-20">
       <text style="color: #fff;line-height: 60rpx;">
				 <!-- <u-text
				   :text="store.storeName"
				   size="20"
				   :bord="true"
				   color="#fff"
				 ></u-text> -->
				 <text style="font-size: 35rpx;">{{store.storeName}}</text>
				 <!-- <u-text :text="'商户号:' + store.id" size="12" color="#fff"></u-text> -->
				 <text style="font-size: 24rpx;margin-left: 10rpx;">{{'商户号:' + store.id}}</text>
			 </text>
        <u-text :text="store.address" size="12" color="#fff"></u-text>
      </view>
    </view>
		
		<view class="cell">
			<u-cell-group>
				<u-cell v-for="(item,index) in cellList"  @click="onJump(item)"  :key="index" :title="item.name" isLink arrow-direction>
						<uni-icons
						slot="icon"
						  custom-prefix="custom-icon"
						  :type="'custom-icon-' + item.icon"
						  size="26"
						/>
				</u-cell>
			</u-cell-group>
		</view>
  <!--  <view class="cell">
      <view
        class="item"
        v-for="(im, ix) in cellList"
        :key="ix"
        @click="onJump(im)"
      >
        <uni-icons
          custom-prefix="custom-icon"
          :type="'custom-icon-' + im.icon"
          size="26"
        />
        <view class="line">
          <u-text :text="im.name" size="16"></u-text>
        </view>
      </view> -->
    </view>
  </view>
</template>

<script>
import { mapState } from "vuex";
import { uNavigateTo } from "../../utils/uniUtils";
export default {
  data() {
    return {
      cellList: [
        // { icon: "dianpu", name: "门店档案", route: "/pages/sds/sdsd/sds" },
        // { icon: "jiesuan", name: "结算账户", route: "/pages/sds/sdsd/sds" },
        // {
        //   icon: "gerenziliaoshezhi-user-setting",
        //   name: "个人中心",
        //   route: "/pages/sds/sdsd/sds",
        // },
        { icon: "xiaoxi", name: "短信充值", route: "/pages/others/rechargeMsg/rechargeMsg" },
        { icon: "shezhi1", name: "设置", route: "/pages/settings/transfer" },
      ],
    };
  },
  onLoad() {},
  computed: {
    ...mapState(["store"]),
    menuButtonHeight() {
      // 状态栏高度
      let ztl = uni.getSystemInfoSync().statusBarHeight;
      // 获取微信胶囊的位置信息
      const custom = wx.getMenuButtonBoundingClientRect();
      // 导航栏高度(标题栏高度) = 胶囊高度 + (顶部距离 - 状态栏高度) * 2
      let ztlh2 = custom.height + (custom.top - ztl) * 2;
      return (getApp().globalData.topHeight = ztl + ztlh2);
    },
  },
  methods: {
    onJump(row) {
      uNavigateTo(row.route);
    },
  },
};
</script>

<style lang="scss" scoped>
	// @import url(@/static/styles/iconfont.css);
.head {
  padding: 150rpx 20rpx 60rpx 40rpx;
	// border-radius: 0 0  30rpx 30rpx;
  display: flex;
  align-items: center;
  // background-color: #454456;
	background: linear-gradient(to bottom, #f3c45d, #fdc31d);

}
.cell {
  background-color: #fff;
	border-radius: 30rpx 30rpx 0 0; 
	overflow: hidden;
	margin-top: -20rpx;
  .item {
    padding-left: 20rpx;
    display: flex;
    align-items: center;
    .line {
      width: 100%;
      padding: 20rpx 0;
      margin-left: 20rpx;
      border-bottom: 1px #f8f8f8 solid;
    }
  }
}
</style>
